package com.godyao.advice;

import com.godyao.framework.aop.MethodBeforeAdvice;
import com.godyao.framework.beans.factory.BeanFactory;
import com.godyao.framework.beans.factory.BeanFactoryAware;

import java.lang.reflect.Method;

public class UserServiceBeforeAdvice implements MethodBeforeAdvice, BeanFactoryAware {
    @Override
    public void before(Method method, Object[] args, Object target) {
        System.out.println("拦截方法："+method.getName());
    }
    @Override
    public void setBeanFactory(BeanFactory beanFactory) {
        System.out.println("bean工厂：" + beanFactory);
    }
}
